//
//  ViewController.m
//  HybidMediation
//
//  Created by jay Win on 2019/9/12.
//  Copyright © 2019 jay Win. All rights reserved.
//

#import "ViewController.h"
#import <KKADManager.h>

@interface ViewController ()


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
  
    
}

-(void)loadFirebaseConfig{
//    _config=[FIRRemoteConfig remoteConfig];
//    FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] init];
//    remoteConfigSettings.minimumFetchInterval = 0;
//    _config.configSettings = remoteConfigSettings;
//    [_config setDefaultsFromPlistFileName:@"AdsConfig"];
//    
//    FIRRemoteConfigValue *meditaionTypeValue=[_config configValueForKey:@"MediationType"];
//    NSString *mediationType=meditaionTypeValue.stringValue;
//    NSLog(@"取到的聚合模式%@:",meditaionTypeValue);
}
- (IBAction)showBanenr:(id)sender {
//    [[KKADManager shareInstance]showBanner:self bannerContainner:_bannerContainner onImpressionEvent:^{
//        NSLog(@"banner展示成功");
//    }];
//    [[KKADManager shareInstance]loadSplash:self];
      [[KKADManager shareInstance]loadSplash:self customView:nil];
}
- (IBAction)hideBanner:(id)sender {
    [[KKADManager shareInstance]hideBanner];
}
- (IBAction)showInterstitial:(id)sender {
    if([[KKADManager shareInstance]hasInterstitial]){
        [[KKADManager shareInstance]showInterstitial:self onOpenEvent:^{
            NSLog(@"==========in open");
        } onCloseEvent:^{
            NSLog(@"=========in close");
        }];
    }else{
        
    }
}

- (IBAction)showRewardVideo:(id)sender {
    if([[KKADManager shareInstance]hasRewardVideo]){
        [[KKADManager shareInstance]showRewardVideo:self onOpenEvent:^{
            NSLog(@"=======re open");
        } onCloseEvent:^{
            NSLog(@"========re clsoe");
        } onCompleteEvent:^{
            NSLog(@"========re complete");
        }];
    }else{
    

    }
}

@end
